<?php declare(strict_types=1);


namespace App\Model\Entity;

use Swoft\Db\Annotation\Mapping\Column;
use Swoft\Db\Annotation\Mapping\Entity;
use Swoft\Db\Annotation\Mapping\Id;
use Swoft\Db\Eloquent\Model;


/**
 * 用户消息接收提醒设置
 * Class MemberSwitch
 *
 * @since 2.0
 *
 * @Entity(table="member_switch")
 */
class MemberSwitch extends Model
{
    /**
     * 用户ID
     * @Id(incrementing=false)
     * @Column(name="member_id", prop="memberId")
     *
     * @var int
     */
    private $memberId;

    /**
     * 1:followers 2:attention 3:like 4:comment 5:sound
     *
     * @Column()
     *
     * @var int
     */
    private $type;

    /**
     * 1:开启 on  0:关闭 off
     *
     * @Column()
     *
     * @var int
     */
    private $setting;


    /**
     * @param int $memberId
     *
     * @return void
     */
    public function setMemberId(int $memberId): void
    {
        $this->memberId = $memberId;
    }

    /**
     * @param int $type
     *
     * @return void
     */
    public function setType(int $type): void
    {
        $this->type = $type;
    }

    /**
     * @param int $setting
     *
     * @return void
     */
    public function setSetting(int $setting): void
    {
        $this->setting = $setting;
    }

    /**
     * @return int
     */
    public function getMemberId(): ?int
    {
        return $this->memberId;
    }

    /**
     * @return int
     */
    public function getType(): ?int
    {
        return $this->type;
    }

    /**
     * @return int
     */
    public function getSetting(): ?int
    {
        return $this->setting;
    }

}
